package com.csjbot.snowbot_rogue.utils;

import android.os.Environment;

/**
 * Created by Administrator on 2016/5/11.
 */
public class Constant {
    public static final int PlayerMsg_PLAY_MSG = 10;
    public static final int PlayerMsg_PAUSE_MSG = 11;
    public static final int PlayerMsg_STOP_MSG = 12;

    public static final String LOCAL_ACTION = "LOCAL_ACTION";

    //    public static final byte SERIAL_DATA_TYPE_ARM = 'A';

    // {SDCARD_PATH}/csjbot [DIR]
    private static final String APP_SDCARD_PATH = Environment.getExternalStorageDirectory().getAbsolutePath()
            + "/csjbot";

    // {SDCARD_PATH}/csjbot/databases [DIR]
    public static final String DATABASE_DIR_PATH = APP_SDCARD_PATH + "/databases";

    // {SDCARD_PATH}/csjbot/picture [DIR]
    public static final String SDCARD_IMAGE_PATH = APP_SDCARD_PATH + "/picture/";

    // {SDCARD_PATH}/csjbot/guide [DIR]
    public static final String SDCARD_GUIDE_PATH = APP_SDCARD_PATH + "/registration/";

    // {SDCARD_PATH}/csjbot/video [DIR]
    public static final String SDCARD_VIDEO_PATH = APP_SDCARD_PATH + "/video/";

    // {SDCARD_PATH}/csjbot/music [DIR]
    public static final String SDCARD_MUSIC_PATH = APP_SDCARD_PATH + "/music/";

    // {SDCARD_PATH}/csjbot/databases/{uuid}_message.db
    public static final String SDCARD_DATABASE_FILE_PATH = DATABASE_DIR_PATH + "/";

    //文件路径，存放客户自定义语音
    public static final String CUSTOM_FILEPATH = Environment.getExternalStorageDirectory().getPath() + "/csjbot/custom/";
    //文件名称，存放客户自定义语音
    public static final String CUSTOM_FILENAME = "自定义语音示例.txt";

    public class Uart {
        public static final String UART_DEVICE = "/dev/ttyS4";
        public static final int BAUD_RATE = 115200;
    }

    public class Expression {
        public static final String ACTION_EXPRESSION_FACE = "com.csjbot.action_expression_face";
        public static final String EXTRA_EXPRESSION_FACE = "expression_face";
        public static final String ACTION_CHANGE_FACE_COLOR = "com.csjbot.action_change_face";

        public static final int EXPRESSION_NORMAL = 0;
        public static final int EXPRESSION_SPEAK = 1;
        public static final int EXPRESSION_HAPPY = 2;
        public static final int EXPRESSION_ANGRY = 3;
        public static final int EXPRESSION_SORROW = 4;
        public static final int EXPRESSION_SHY = 5;
        public static final int EXPRESSION_SLEEP = 6;
        public static final int EXPRESSION_AFRAID = 7;
        public static final int EXPRESSION_AMAZING = 8;
        public static final int EXPRESSION_QUERIES = 9;
        public static final int EXPRESSION_TEST = 10;
    }

    public class SharePreference {
        public static final String EXPRESSION_FACE_COLOR = "expression_face_color";
    }

    public static final String ACTION_OTHER_CMD = "com.csjbot.action_other_cmd";

    public static final String ACTION_TOUCH_GET = "com.csjbot.action_touch_get";
    public static final String ACTION_DOUBLE_TOUCH_GET = "com.csjbot.action_double_touch_get";
    public static final String ACTION_WAKEUP = "com.csjbot.action_wakeup";
    public static final String ACTION_SPEACH_END = "com.csjbot.action_speach_end";
    public static final String ACTION_SPEACH_START = "com.csjbot.action_speach_start";
    public static final String ACTION_MUSIC_READY_BEGIN = "com.csjbot.action_music_play";
    public static final String ACTION_TEMPERATURE_HUMIDITYGET = "com.csjbot.action_temperature_humidityGet";
    public static final String ACTION_PM25GET = "com.csjbot.action_pm25get";

    public static final String ACTION_SERIAL_SEND_OK = "com.csjbot.action_serial_send_ok";

    public final static String WAV_PATH = "wav/";
    public final static String VOLUME_PATH = WAV_PATH + "volume.wav";

//    //上一首，下一首等音乐指令
//    public static final String ACTION_MUSIC_CONTROL = "com.csjbot.action_music_control";

    //休眠指令
    public static final String ACTION_SLEEP = "com.csjbot.action_sleep";

    //传递music data
    public static final String ACTION_MUSIC_DATA = "com.csjbot.action_music_data";

    //判断当前是否已处于activity
    public static final String ACTION_IN_ACTIVITY = "com.csjbot.action_in_activity";

    //处于故事activity时，换个故事
    public static final String ACTION_STORY_DATA = "com.csjbot.action_story_data";
    public static final String ACTION_STORY_DATA_DEMO = "com.csjbot.action_story_data_demo";
    //处于新闻activity时，换条新闻
    public static final String ACTION_NEWS_DATA = "com.csjbot.action_news_data";

    //当处于播放新闻的时候，换了条新闻，播放activity退出
    public static final String ACTION_RESTART_CMD = "com.csjbot.action_restart_cmd";

    //处于菜谱activity时，换个菜谱
    public static final String ACTION_COOKBOOK_DATA = "com.csjbot.action_cookbook_data";

    //处于天气activity时，提问另一个天气
    public static final String ACTION_WEATHER_DATA = "com.csjbot.action_weather_data";

    //处于诗歌activity时，换个菜谱
    public static final String ACTION_POETRY_DATA = "com.csjbot.action_poetry_data";

    //处于计算activity时，换个菜谱
    public static final String ACTION_COUNT_DATA = "com.csjbot.action_count_data";

    public static final String ACTION_AIUI_WIFI_CONNECTED = "com.csjbot.action_aiui_wifi_connected_state";

    public static final String ACTION_AIUI_CAMERA = "com.csjbot.action_aiui_camera";

    //将rc、说的话显示在speakActivity上
    public static final String ACTION_SPEAK_TEXT_COMMUNICATION = "com.csjbot.action_speak_text_communication";

    public static final String ACTION_SPEAK_FINISHED = "com.csjbot.action_speak_finished";

    //顾客定制
    public static final String ACTION_CUSTOMER = "com.csjbot.action_customer";

    public class Music {
        public final static String KEY_OPERATION = "operation";
        public final static String KEY_SEMANTIC = "semantic";
        public final static String KEY_SLOTS = "slots";
        public final static String KEY_INSTYPE = "insType";
        public final static String KEY_STATE = "used_state";
        public final static String KEY_MISMATCH = "mismatch{artist,song}";
        public final static String OPERATION_INS = "INSTRUCTION";
        public final static String INSTYPE_SLEEP = "sleep";

        /**
         * 音乐播放控制命令
         **/
        public final static String INSTYPE_NEXT = "next";
        public final static String INSTYPE_PAST = "past";
        public final static String INSTYPE_REPLAY = "replay"; // 继续播放
        public final static String INSTYPE_REPEAT = "repeat";
        public final static String INSTYPE_PAUSE = "pause";
        public final static String INSTYPE_LOOP = "loop";       // 列表循环
        public final static String INSTYPE_CYCLE = "cycle";     // 单曲循环
        public final static String INSTYPE_REPLAYANSWER = "replayAnswer";


        /**
         * 音量控制命令
         **/
        public final static String INSTYPE_VOLMAX = "volume_max";
        public final static String INSTYPE_VOLMID = "volume_mid";
        public final static String INSTYPE_VOLMIN = "volume_min";
        public final static String INSTYPE_VOLMINUS = "volume_minus";
        public final static String INSTYPE_VOLPLUS = "volume_plus";
    }

    public static boolean ISVOLCHANGE = false;

    /**
     * 保存SD卡文件名
     */
    public class SDFileUtil {
        public final static String OUTWARE_REGISTRATION_INFO = "guideInfo";
    }


    public static final int LOW_POWER_TO_WARNING = 40;

    public static final int LOW_POWER_GO_HOME = 30;

    public static final String SLAM_DEFAULT_IP = "192.168.99.2";

}
